//
//  LSPubulishTopicCell.m
//  LookScore
//
//  Created by wws on 2018/5/8.
//  Copyright © 2018年 ChongQingXunTiCompany. All rights reserved.
//

#import "LSPubulishTopicCell.h"
#import "LSPublishModel.h"
@implementation LSPubulishTopicCell{
    

}
- (IBAction)nameBtnClicked:(UIButton *)sender {
    if (self.block) {
        self.block(sender);
    }
}


- (void)awakeFromNib {
    [super awakeFromNib];
    self.nameBtn.layer.cornerRadius = 10;
    self.nameBtn.layer.borderColor = Color(129, 128, 128).CGColor;
    self.nameBtn.layer.borderWidth = .5;
    self.nameBtn.layer.masksToBounds = YES;
    self.nameBtn.titleLabel.numberOfLines = 2;
    self.nameBtn.titleLabel.textAlignment = NSTextAlignmentCenter;
    self.nameBtn.titleLabel.font = [UIFont systemFontOfSize:LSAutoVlaue(11, LSScreenWidth)];
    
    // Initialization code
}
- (void)setSection:(NSInteger)section{
    _section = section;
    if (section == 1) {
        [self.nameBtn setBackgroundColor:Color(210,210,210)];
    }else{
        [self.nameBtn setBackgroundColor:LSTitleWhiteColor];
        
    }
    
}
- (void)setModel:(LSPublishModel *)model{
    _model = model;
    if (model.MatchState == -1) {
        [self.nameBtn setTitle:[NSString stringWithFormat:@"%@\n%@",model.Battle,@"(已完场)"] forState:UIControlStateNormal];
    }else{
        [self.nameBtn setTitle:model.Battle forState:UIControlStateNormal];
    }
    
}

@end
